Skip to content

Fix trade indexer BlockNotFoundError with retry#336

Merged
realproject7 merged 1 commit intomainfrom
task/fix-trade-indexer-block-retry
Mar 18, 2026
Merged

Fix trade indexer BlockNotFoundError with retry#336
realproject7 merged 1 commit intomainfrom
task/fix-trade-indexer-block-retry

Conversation

@realproject7
Copy link
Copy Markdown
Owner

Summary

  • Add retry loop (5 attempts, 1s linear backoff) to getBlock call in trade indexer
  • Fixes BlockNotFoundError on recently confirmed blocks when RPC hasn't propagated yet
  • Same pattern as existing getReceiptWithRetry in lib/rpc.ts

The trade indexer fires immediately after waitForTransactionReceipt, but load-balanced RPC nodes may not have the block metadata yet.

getBlock fails on recently confirmed blocks when the RPC node hasn't
propagated yet. Add retry loop (5 attempts, linear backoff) matching
the existing getReceiptWithRetry pattern.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@realproject7 realproject7 merged commit 6e02953 into main Mar 18, 2026
@realproject7 realproject7 deleted the task/fix-trade-indexer-block-retry branch March 18, 2026 17:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant